package com.bfly.core.base.entity;

import java.io.Serializable;
import java.util.Map;

/**
 * 远程访问返回结果封装
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/12/2 13:10
 */
public class RemoteResponse implements Serializable {

    private static final long serialVersionUID = 3689916349883280462L;
    /**
     * 响应头部信息
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:17
     */
    private Map<String, String> headers;

    /**
     * 业务状态是否成功
     *  Returns true if the code is in [200..300), which means the request was successfully received,understood, and accepted.
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:15
     */
    private boolean successful;

    /**
     * HTTP status code
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:11
     */
    private int code;

    /**
     * Returns the HTTP status message
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:16
     */
    private String message;

    /**
     * 业务错误代码
     * @author 长沙商脉科技有限公司
     * @date 2020/12/11 19:49
     */
    private String errorCode;

    /**
     * 业务错误描述
     * @author 长沙商脉科技有限公司
     * @date 2020/12/11 19:50
     */
    private String errorMsg;

    /**
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:12
     */
    private String body;

    /**
     * 内容长度
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:13
     */
    private long contentLength;

    /**
     * 内容类型
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/12/2 13:13
     */
    private String contentType;

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public boolean isSuccessful() {
        return successful;
    }

    public void setSuccessful(boolean successful) {
        this.successful = successful;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public long getContentLength() {
        return contentLength;
    }

    public void setContentLength(long contentLength) {
        this.contentLength = contentLength;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
